SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwlInscripcionesConvocatorias
AS
SELECT     dbo.tb_InscripcionesConvocatorias.idInscripcionConvocatoria AS ID, dbo.tb_InscripcionesConvocatorias.Agente, dbo.vwrConvocatorias.Descripcion AS Convocatoria, 
                      dbo.vwrCargosGenericos.Descripcion AS CargoGenerico, dbo.vwrAsignaturasGenericas.Descripcion AS AsignaturaGenerica, 
                      dbo.vwrLocalidades.Descripcion AS Localidad, dbo.vwrCiclos.Descripcion AS Ciclo, dbo.vwrNivelesEnsenanza.Descripcion AS Nivel, 
                      dbo.vwrModalidadesEnsenanza.Descripcion AS Modalidad, dbo.vwrSituacionRevista.Descripcion AS SitRevista, dbo.tb_InscripcionesConvocatorias.Puntaje, 
                      CASE WHEN (CAST(dbo.tb_InscripcionesConvocatorias.Fecha9 AS DATETIME) >= dbo.tb_Parametros.valor1) THEN 'Nuevo' ELSE 'Viejo' END AS ViejoNuevo, 
                      dbo.vwrAreaJuntas.descripcion AS AreaJuntaSecundaria
FROM         dbo.tb_InscripcionesConvocatorias INNER JOIN
                      dbo.vwrConvocatorias ON dbo.tb_InscripcionesConvocatorias.Convocatoria = dbo.vwrConvocatorias.ID LEFT OUTER JOIN
                      dbo.vwrCargosGenericos ON dbo.tb_InscripcionesConvocatorias.CargoGenerico = dbo.vwrCargosGenericos.ID LEFT OUTER JOIN
                      dbo.vwrAsignaturasGenericas ON dbo.tb_InscripcionesConvocatorias.AsignaturaGenerica = dbo.vwrAsignaturasGenericas.ID LEFT OUTER JOIN
                      dbo.vwrLocalidades ON dbo.tb_InscripcionesConvocatorias.Localidad = dbo.vwrLocalidades.ID LEFT OUTER JOIN
                      dbo.vwrNivelesEnsenanza ON dbo.tb_InscripcionesConvocatorias.Nivel = dbo.vwrNivelesEnsenanza.ID LEFT OUTER JOIN
                      dbo.vwrCiclos ON dbo.tb_InscripcionesConvocatorias.Ciclo = dbo.vwrCiclos.ID LEFT OUTER JOIN
                      dbo.vwrModalidadesEnsenanza ON dbo.tb_InscripcionesConvocatorias.Modalidad = dbo.vwrModalidadesEnsenanza.ID LEFT OUTER JOIN
                      dbo.vwrAreaJuntas ON dbo.tb_InscripcionesConvocatorias.AreaJuntas = dbo.vwrAreaJuntas.id LEFT OUTER JOIN
                      dbo.vwrSituacionRevista ON dbo.tb_InscripcionesConvocatorias.SituacionRevista = dbo.vwrSituacionRevista.ID CROSS JOIN
                      dbo.tb_Parametros
WHERE     (dbo.tb_Parametros.idParametro = 60)
GO
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [dataentry]
GRANT INSERT ON  [dbo].[vwlInscripcionesConvocatorias] TO [dataentry]
GRANT UPDATE ON  [dbo].[vwlInscripcionesConvocatorias] TO [dataentry]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [Direcciones De Nivel]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [Juntas]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [MCEEjecutivo]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [PersonalDocenteDireccion]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [RegistroTitulos]
GRANT SELECT ON  [dbo].[vwlInscripcionesConvocatorias] TO [SoloVer]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[53] 4[9] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -192
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_InscripcionesConvocatorias"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 125
               Right = 250
            End
            DisplayFlags = 280
            TopColumn = 23
         End
         Begin Table = "vwrConvocatorias"
            Begin Extent = 
               Top = 126
               Left = 38
               Bottom = 245
               Right = 236
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrCargosGenericos"
            Begin Extent = 
               Top = 126
               Left = 274
               Bottom = 245
               Right = 472
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrAsignaturasGenericas"
            Begin Extent = 
               Top = 246
               Left = 38
               Bottom = 365
               Right = 236
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrLocalidades"
            Begin Extent = 
               Top = 246
               Left = 274
               Bottom = 335
               Right = 472
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrNivelesEnsenanza"
            Begin Extent = 
               Top = 336
               Left = 274
               Bottom = 425
               Right = 472
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrCiclos"
            Begin Extent = 
               Top = 366
               Left = 38
               Bottom ', 'USER', N'dbo', 'VIEW', N'vwlInscripcionesConvocatorias', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'= 455
               Right = 236
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrModalidadesEnsenanza"
            Begin Extent = 
               Top = 426
               Left = 274
               Bottom = 530
               Right = 472
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrSituacionRevista"
            Begin Extent = 
               Top = 456
               Left = 38
               Bottom = 560
               Right = 236
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Parametros"
            Begin Extent = 
               Top = 534
               Left = 274
               Bottom = 653
               Right = 472
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrAreaJuntas"
            Begin Extent = 
               Top = 198
               Left = 510
               Bottom = 287
               Right = 708
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwlInscripcionesConvocatorias', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwlInscripcionesConvocatorias', NULL, NULL
GO
